package world.xuewei.dao;

import org.apache.ibatis.annotations.Param;
import world.xuewei.model.entity.CommodityReview;
import java.util.List;

public interface CommodityReviewDao {

    /**
     * 插入评论
     */
    int insertReview(CommodityReview review);

    /**
     * 删除评论
     */
    int deleteReviewById(@Param("id") Long id);

    /**
     * 查询商品评论列表
     */
    List<CommodityReview> queryReviewsByCommodityId(@Param("commodityId") Long commodityId);

    /**
     * 查询单个评论
     */
    CommodityReview queryReviewById(@Param("id") Long id);
}